import request from '@/utils/request'

export function getTemplateList(data) {
  return request({
    url: '/wx/kd/msg/template_msg_config/sub_msg_list',
    method: 'get'
  })
}

export function addTemplateConfig(data) {
  return request({
    url: '/wx/kd/msg/biz_config/add',
    method: 'post',
    data: data
  })
}
export function updateTemplateConfig(data) {
  return request({
    url: '/wx/kd/msg/biz_config/update',
    method: 'post',
    data: data
  })
}

export function templateConfigInfo(configId) {
  return request({
    url: '/wx/kd/msg/biz_config/info',
    method: 'get',
    params: { configId }
  })
}

export function deleteTemplateConfig(configId) {
  return request({
    url: '/wx/kd/msg/biz_config/delete',
    method: 'delete',
    params: { id: configId }
  })
}

export function templateConfigList() {
  return request({
    url: '/wx/kd/msg/biz_config/all',
    method: 'get'
  })
}

